package org.vacoor.ticket.bean.param.impl;

import org.vacoor.ticket.bean.param.Parameter;

/**
 * 封装登录的参数信息
 * @author vacoor
 *
 */
public class LoginParam implements Parameter{
	private String username;
	private String password;
	private String authCode;	//验证码
	private String randCode;	//随机登录码
	
	public LoginParam(String username, String password, String authCode, String randCode) {
		this.username = username;
		this.password = password;
		this.authCode = authCode;
		this.randCode = randCode;
	}

	@Override
	public String getQueryString() {
		return 
		//以下为请求参数
		"loginUser.user_name=" + username +   	//用户名
		"&user.password=" + password + 		//密码
		"&randCode=" + authCode + 			//验证码
		"&loginRand=" + randCode + 				//随机登录码
		 //非必须
		"&refundLogin=N" +
		"&refundFlag=Y" +
		"&nameErrorFocus=" +
		"&passwordErrorFocus=" +
		"&randErrorFocus=";
	}

	@Override
	public String toString() {
		return "LoginQuery [username=" + username + ", password=" + password
				+ ", authCode=" + authCode + ", randCode=" + randCode + "]";
	}
}
